# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=acpica
pkgver=20200717
pkgrel=0
pkgdesc="ACPI Component Architecture utilities"
url="https://www.acpica.org"
arch="all !mips64"
license="GPL-2.0-only OR BSD-3-Clause OR Intel-ACPI"
makedepends="flex bison"
subpackages="iasl"
options="!check"
source="acpica-unix-$pkgver.tar.gz::https://acpica.org/sites/acpica/files/acpica-unix-$pkgver.tar_0.gz
	disable-werror.patch
	"

builddir="$srcdir"/acpica-unix-$pkgver
build() {
	make
}

package() {
	make install DESTDIR="$pkgdir"
}

iasl() {
	pkgdesc="ACPI ASL compiler"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/iasl "$subpkgdir"/usr/bin/
}

sha512sums="16de55b97a3b478dd2dd44fcbe51b871c7cc6174d337939b873bcbc871bee10487a796aa86abaa7b54ff6b75279cdbf9ec48e19f6baaea4290daf1ad56bdbc46  acpica-unix-20200717.tar.gz
1f5049568d612d4debf3690e0d918d8d56abbed14ade7b2e6282eba17b25934b695d1a9fe10f99469efe8d4382c4546481d0579afdf5cdb9695fcdc93559fbab  disable-werror.patch"
